package interfaces;

import framework.BoardImpl;

/**
 * A Cell represents a spot in the Board.
 * Each Cell has related Board, Algorithm
 * and State.  All Cells will share one Algorithm
 * and one Board but each Cell has its own State.
 * @author bcharna
 *
 */
public interface Cell {
	
	/**
	 * get the Cell's State 
	 * @return this Cell's State
	 */
	public State getState();
	
	
	/**
	 * set the Cell's State
	 * @param s State to set to this Cell
	 */
	public void setState(State s);

	/**
	 * Act. Tells the automaton to call its algorithm and act
	 * @param board - the board that contains the automaton
	 * @param row - cell row
	 * @param col - cell column
	 * @return Command that cell needs to perform
	 */
	public Command act(BoardImpl board, int row, int col);

	/**
	 * Clone method to copy a cell.  Useful for tracking history.
	 * @return a clone of the receiver Cell.
	 */
	public Cell clone();
	
}

